package cn.anlab.anappframe.net.sub2;

import org.json.JSONException;
import org.json.JSONObject;

public class InPacket extends Packet {
	
	public InPacket(int cmd, int rc, byte[] body) {
		super.cmd = cmd;
		super.rc = rc;
		super.body = body;
	}
	
	public String getContent() {
		String content = new String(body);
		return content;
	}
	
	public JSONObject getJson() throws JSONException {
		JSONObject json = new JSONObject(getContent());
		return json;
	}

	
}
